<?php
/**
 * Created by PhpStorm.
 * User: HP
 * Date: 2017/6/16
 * Time: 11:09
 */

defined('BASEPATH') OR exit('No direct script access allowed');

//定义前台总控制器
class Home_Controller extends CI_Controller {
    public function __construct()
    {
        parent::__construct();
        //开启皮肤功能
        $this->load->switch_themes_on();
    }
}

//定义后台总控制器
class Admin_Controller extends CI_Controller {
    public function __construct()
    {
        parent::__construct();
        //关闭皮肤功能
        $this->load->switch_themes_off();
        $admin_id = $this->session->userdata('admin');
        if(empty($admin_id)){
            redirect('Admin/Login/login');
        }
    }
}